package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author hyh
 * @version 1.0
 */
@Mapper
public interface SetmealDishMapper {

    int countNum(List<Long> ids);
    @Select("select * from setmeal_dish where setmeal_id = #{id}")
    List<SetmealDish> selectById(Integer id);

    /**
     * 套餐菜品更新
     * @param setmealDish
     */
    void update(List<SetmealDish> setmealDish);

    /**
     * 套餐菜品添加
     * @param setmealDish
     */
    void insert(List<SetmealDish> setmealDish);

    /**
     * 根据id删除菜品
     * @param id
     */
    void deleteById(@Param("id") Long id);
}
